package com.gitee.wsl.model

/*interface Hook<Pipeline,HookHandler> {
   fun install(pipeline: Pipeline, handler: HookHandler)
}*/

interface ModelHook<TModel:Model<TModel>,HookHandler> {
   /**
    * Specifies how to install a hook into [client].
    */
   fun install(client: TModel, handler: HookHandler)
}

class ModelHookHandler<TModel:Model<TModel>,T>(private val hook: ModelHook<TModel,T>, private val handler: T) {
   fun install(client: TModel) {
      hook.install(client, handler)
   }
}